package com.tansun.easycare.rule.common;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.github.pagehelper.Page;
import com.tansun.easycare.core.config.Global;

public class BaseVO<T> implements Serializable {

    private static final long serialVersionUID = -1832815736247249931L;

    private String rankRelationId;
    
    private List<String> rankRelationIds;   //层级关系关联ID列表，包括上级
 
    private  int  pageSize;
    
    private  int  pageNum;
    
    protected Page<T> page;

    public Page<T> getPage() {
        if (this.page == null) {
            this.page = new Page<T>();
            this.page.setPageNum(this.pageNum);
            this.page.setPageSize(this.pageSize);
        }
        return page;
    }

    public Page<T> setPage(Page<T> page) {
        this.page = page;
        return page;
    }

    /**
     * 获取数据库名称
     */
    @JsonIgnore
    public String getDbName() {
        return Global.getConfig("jdbc.type");
    }
    public String getRankRelationId() {
		return rankRelationId;
	}

	public void setRankRelationId(String rankRelationId) {
		this.rankRelationId = rankRelationId;
	}

	public List<String> getRankRelationIds() {
		return rankRelationIds;
	}

	public void setRankRelationIds(List<String> rankRelationIds) {
		this.rankRelationIds = rankRelationIds;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageNum() {
		return pageNum;
	}

	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
 
	
	
}
